#include <stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
    char *a[1024];
    char b[]="  ls             -l       -a";
    printf("未分割前:%s\n",b);
    a[0]=strtok(b," ");
    printf("分割一次:%s\n",b);
    int i=0;
    for(i=1;a[i-1]!=NULL;i++)
    {
       a[i]= strtok(NULL," ");
    }
    for(i=0;a[i]!=NULL;i++)
    {
        printf("%s ",a[i]);
    }

    printf("分割完:%s",b);
  ///  printf("\n");
  ///  printf("-------------------------\n");
  ///  int len=strlen(b);
  ///  if(len==0)
  ///  {

  ///      printf("我是空\n");
  ///  }
  ///  else
  ///  {

  ///      printf("%d,%s\n",len,b);
  ///  }
  ///  return 0;








}

